-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(feat) Adds request rate limit throttling to Injective Perpetual #353
Conversation
This pull request has been linked to Shortcut Story #39661: Add requests throttling to Injective Perpetual. |
SECOND = 1 | ||
MINUTE = 60 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use the globals in hummingbot.connector.constants instead of defining them here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes look good to me
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested and confirmed working by QA.
- Connected API keys and confirmed working as expected
- Confirmed wallet and exchange balances are reflecting correct
- Created a perpetual_mm strategy and went through initial prompts successfully
- Started the strategy without issues, confirmed orders are created and cancelled based on config
- Confirmed order book prices is in sync with the exchange
- Confirmed positions are detected whenever it’s opened or closed
- Confirmed funding payment is being received by the bot
- Trade information are correct based on history command output
- Compared trades in client and exchange, no discrepancies found
- Confirmed running on multiple order levels works as expected
Closing to re-open towards foundation: hummingbot#6283 |
Before submitting this PR, please make sure:
A description of the changes proposed in the pull request:
This PR introduces rate limiting for Injective perpetual connector SDK calls.
The rate limits are 120 requests per minute per service (gRPC vs HTTP), and only chain calls are limited, with indexer calls being unrestricted.
Tests performed by the developer:
Manually tested that the connector works after the introduction of the changes.
Tips for QA testing:
Please test the connector's operation for several cycles (at least 5m) with several order levels. The rate limits are on 1s basis, so we really just need to make sure that the rate limits are not impairing the connector's operation during any periods of high requests, like during the status polling loop.
[ch-39661]